cmake_minimum_required(VERSION 3.5)

project(localplayer LANGUAGES CXX)

SET(CMAKE_CXX_FLAGS -pthread)

add_definitions("-Wall -g")

set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# QtCreator supports the following variables for Android, which are identical to qmake Android variables.
# Check http://doc.qt.io/qt-5/deployment-android.html for more information.
# They need to be set before the find_package(Qt5 ...) call.


find_package(OpenCV REQUIRED)
##下面是输出信息
message(STATUS "Opnecv ;ibrary status: ")
message(STATUS "> version: ${OpenCV_VERSION} ")
message(STATUS "libraries: ${OpenCV_LIBS} ")
message(STATUS "> include: ${OpenCV_INCLUDE_DIRS}  ")

include_directories(${OpenCV_INCLUDE_DIRS})


find_package(Qt5 COMPONENTS Widgets Core Gui REQUIRED)

add_executable(localplayer
  main.cpp
  mainwindow.cpp
  mainwindow.h
  ./playerwidget.h
  ./playerwidget.cpp
  ./piccache.h
  ./piccache.cpp
  ./LocalPlayer.h
  ./LocalPlayer.cpp
  ./IniHandle/INIReader.h
  ./IniHandle/IniHandleApi.h
  ./IniHandle/IniHandleApi.cpp
)

target_link_libraries(localplayer
    PRIVATE 
    Qt5::Widgets 
    ${OpenCV_LIBS} 
    )
